home *** CD-ROM | disk | FTP | other *** search
- <root>
- <test>
- <comment>open stmt</comment>
- <input>
- <![CDATA[
- OPEN somecursor;
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[]]>
- </output>
- </test>
- <test>
- <comment>close stmt</comment>
- <input>
- <![CDATA[
- CLOSE somecursor;
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[]]>
- </output>
- </test>
- <test>
- <comment>commit work</comment>
- <input>
- <![CDATA[
- COMMIT WORK;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
-
- <test>
- <comment>rollback stmt</comment>
- <input>
- <![CDATA[
-
- ROLLBACK WORK;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>positioned delete</comment>
- <input>
- <![CDATA[
- DELETE
- FROM [Customers]
- WHERE CURRENT OF someCursor
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- searched delete
- </comment>
- <input>
- <![CDATA[
- DELETE
- FROM [Customers]
- WHERE [Customers].[CustomerID] = @CustomerID
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- normal insert</comment>
- <input>
- <![CDATA[
- INSERT
- INTO [Customers]
- ( [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City])
- VALUES (@CustomerID, @CompanyName, @ContactTitle, @Address, @City)
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- normal insert with NULL</comment>
- <input>
- <![CDATA[
- INSERT
- INTO [Customers]
- ( [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City])
- VALUES (@CustomerID, @CompanyName, NULL, @Address, @City)
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- query-based insert</comment>
- <input>
- <![CDATA[
- INSERT
- INTO [Customers]
- ( [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City])
- SELECT
- [Customers2].[CustomerID],
- [Customers2].[CompanyName],
- [Customers2].[ContactTitle],
- [Customers2].[Address],
- [Customers2].[City]
- FROM [Customers2]
- WHERE [Customers2].[MoveToCustomers] = 1
-
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
-
-
- <test>
- <comment>-- basic select</comment>
- <input>
- <![CDATA[
- SELECT
- [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City]
- FROM [Customers]
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- basic select with where</comment>
- <input>
- <![CDATA[
- SELECT
- [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City]
- FROM [Customers]
- WHERE [Customers].[CustomerID] = @CustomerID
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- basic select with group by</comment>
- <input>
- <![CDATA[
-
- SELECT
- [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City]
- FROM [Customers] Group By City
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- basic select with order by</comment>
- <input>
- <![CDATA[
-
- SELECT
- [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City]
- FROM [Customers] OrDEr bY Address
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- basic select with top</comment>
- <input>
- <![CDATA[
-
- SELECT TOP 5
- [Customers].[CustomerID],
- [Customers].[CompanyName],
- [Customers].[ContactTitle],
- [Customers].[Address],
- [Customers].[City]
- FROM [Customers];
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- positioned update</comment>
- <input>
- <![CDATA[
-
- UPDATE [Customers]
- SET
- [Customers].[CompanyName] = @CompanyName,
- [Customers].[ContactTitle] = @ContactTitle,
- [Customers].[Address] = @Address,
- [Customers].[City] = @City
- WHERE CURRENT OF somecursor
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
- <test>
- <comment>-- searched update</comment>
- <input>
- <![CDATA[
- UPDATE [Customers]
- SET
- [Customers].[CompanyName] = @CompanyName,
- [Customers].[ContactTitle] = @ContactTitle,
- [Customers].[Address] = @Address,
- [Customers].[City] = @City
- WHERE [Customers].[CustomerID] = @CustomerID
- ;
-
- ]]>
- </input>
- <tree>
- </tree>
- <output>
- <![CDATA[
- ]]>
- </output>
- </test>
-
- </root>